package com.etonedu.meals.enumeration;

public enum APICodeEnum {

    agw10111006("agw10111006", "1", "获取accessToken接口"),
    agw10111007("agw10111007", "1", "刷新accessToken接口"),
    agw20101004("agw20101004", "1", "获取班级信息"),

    agw30161001("agw30161001", "1", "班牌状态上报"),
    agw30161011("agw30161011", "1", "班牌心跳接收"),

    agw30161009("agw30161009", "1", "通过设备号查询绑定信息接口"),
    agw30161016("agw30161016", "1", "查询天气"),
    agw30161012("agw30161012", "1", "班牌开关机时间"),
    agw30161013("agw30161013", "1", "班牌开关屏时间"),
    agw30161015("agw30161015", "1", "班牌考勤时间"),
    agw30161018("agw30161018", "1", "打卡考勤上报"),
    agw30161002("agw30161002", "1", "班牌信息上报"),
    agw30161003("agw30161003", "1", "班牌截图信息上报"),
    agw30161004("agw30161004", "1", "班牌日志上报"),
    agw30161010("agw30161010", "1", "查询指定app版本地址"),
    agw30161019("agw30161019", "1" ,"班牌app版本检查查询"),
    agw30161023("agw30161023", "1" ,"走班考勤上报"),
    agw30161044("agw30161044", "1", "查询设备psk"),

    // 分号结束符
    NONE("NONE", "", "空");


    private static final String API_NONE = "";
    private String apiCode;
    private String ver;
    private String apiName;

    APICodeEnum(String apiCode, String ver, String apiName) {
        this.apiCode = apiCode;
        this.ver = ver;
        this.apiName = apiName;
    }

    public String getApiCode() {
        return apiCode;
    }

    public void setApiCode(String apiCode) {
        this.apiCode = apiCode;
    }

    public String getVer() {
        return ver;
    }

    public void setVer(String ver) {
        this.ver = ver;
    }

    public String getApiName() {
        return apiName;
    }

    public void setApiName(String apiName) {
        this.apiName = apiName;
    }

    public static String getverByCode(String code) {
        for (APICodeEnum respEnum : APICodeEnum.values()) {
            if (code.equals(respEnum.getApiCode())) {
                return respEnum.getVer();
            }
        }
        return API_NONE;
    }
}
